﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UserModels;

namespace UserRepositorys.Intface
{
    public interface IRoleRepository
    {
        /// <summary>
        /// 添加角色
        /// </summary>
        /// <param name="roleInfo"></param>
        /// <returns></returns>
        Task<int> AddRole(RoleInfoModel roleInfo);

        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        Task<int> DeleteRole(int roleId);

        /// <summary>
        /// 反填角色信息
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        Task<RoleInfoModel> GetRoleById(int roleId);

        /// <summary>
        /// 查询所有角色
        /// </summary>
        /// <returns></returns>
        Task<(int totalCount, int pageCount, List<RoleInfoModel> roleList)> GetRoleShow(string? roleName, int pageIndex, int pageSize);

        /// <summary>
        /// 查询所有角色（分页）
        /// </summary>
        /// <returns></returns>
        Task<(int totalCount,int pageCount, List<RoleInfoModel> roleList)> GetRoleList(string?roleName,int pageIndex,int pageSize);
        /// <summary>
        /// 查询所有角色
        /// </summary>
        /// <returns></returns>
       Task<List<RoleInfoModel>> GetRoleAllList();

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="enity"></param>
        /// <returns></returns>
        Task<int> Updateasync(RoleInfoModel enity);
    }
}
